<template>
	<view class="container">
		<view class="" style="background-color: #F6F6F6;height: 10rpx;">

		</view>
    <empty v-if="data.teamlist.length==0">

	</empty>
		<view class="list-box" v-for="item in data.teamlist">
			<image :src="item.head || $defaultAvatar" mode="aspectFill"></image>
			<view class="">
				<view class="list-name">
					{{item.nickname}}
				</view>
				<view class="list-tips">
					手机号：{{item.mobile}}
				</view>
			</view>
			<view class="list-right">
				个人业绩:{{item.person_money}}
			</view>
		</view>
	</view>
</template>

<script setup>
	import {ref,reactive,getCurrentInstance} from "vue";
	import {onLoad,onShow,onPullDownRefresh,onReachBottom} from "@dcloudio/uni-app";
  import Empty from "@/components/empty.vue";
	const {proxy} = getCurrentInstance();
	const data = reactive({
		code: true,
		teamlist:[],
		userInfo:{},
		info:{}
	})
	onLoad((option) => {
		shopClassList()
		data.userInfo=uni.getStorageSync('userInfo')
	})
	onShow(() => {

	})
	onPullDownRefresh(() => {
		setTimeout(function() {
			uni.stopPullDownRefresh();
		}, 1000);
	})
	onReachBottom(() => {
		console.log('onReachBottom')
	})

	function shopClassList() {
		proxy.$request({
			url: `api/team/`,
			method: 'get',
			success(res) {
				data.teamlist=res.data.team_list
				data.info=res.data

			}
		})
	}
</script>

<style lang="scss" scoped>
.list-box{
	height: 136rpx;
	background: #FFFFFF;
	display: flex;
	align-items: center;
	padding: 0 30rpx;

	image{
		width: 88rpx;
		height: 88rpx;
		border-radius: 50%;
		margin-right: 20rpx;
	}
	.list-name{
		font-weight: 500;
		font-size: 28rpx;
		color: #2D2D2D;
	}
	.list-tips{
		font-weight: 400;
		font-size: 24rpx;
		color: #2D2D2D;
		margin-top: 5rpx;
	}
	.list-right{
		position: absolute;
		right: 30rpx;
		font-size: 24rpx;
		color: #2D2D2D;
	}
}
</style>
